package com.dyj.tiktok.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class QueryVideoListVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 视频列表
     */
    private List<Videos> videos;

    /**
     * 分页的游标
     */
    private Long cursor;

    /**
     * 是否有更多视频
     */
    @JSONField(name = "has_more")
    private Boolean hasMore;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class Videos implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        /**
         * TikTok 视频的唯一标识符
         */
        private String id;

        /**
         * 创建时间
         */
        @JSONField(name = "create_time")
        private Long createTime;

        /**
         * 封面图片网址
         */
        @JSONField(name = "cover_image_url")
        private String coverImageUrl;

        /**
         * 分享网址
         */
        @JSONField(name = "share_url")
        private String shareUrl;

        /**
         * 视频描述
         */
        @JSONField(name = "video_description")
        private String videoDescription;

        /**
         * 视频的时长（以秒为单位）
         */
        private Integer duration;

        /**
         * 视频的高度
         */
        private Integer height;

        /**
         * 视频的宽度
         */
        private Integer width;

        /**
         * 标题
         */
        private String title;

        /**
         * 嵌入HTML
         */
        @JSONField(name = "embed_html")
        private String embedHtml;

        /**
         * 嵌入链接
         */
        @JSONField(name = "embed_link")
        private String embedLink;

        /**
         * 点赞数
         */
        @JSONField(name = "like_count")
        private Integer likeCount;

        /**
         * 评论数
         */
        @JSONField(name = "comment_count")
        private Integer commentCount;

        /**
         * 分享数量
         */
        @JSONField(name = "share_count")
        private Integer shareCount;

        /**
         * 观看次数
         */
        @JSONField(name = "view_count")
        private Integer viewCount;

    }
}
